package com.zxjbyte.yiyi.framework.requestlog.config;

import com.zxjbyte.yiyi.framework.requestlog.enums.RequestLogLevel;
import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.Collections;
import java.util.List;

/**
 * @Author zhangxingjia
 * @Date 2023/3/10 10:59
 * @Version: 1.0
 */
@Getter
@Setter
@ConfigurationProperties(RequestLogProperties.REQUEST_LOG_PROPS_PREFIX)
public class RequestLogProperties {

    // 请求日志属性前缀
    public static final String REQUEST_LOG_PROPS_PREFIX = "yiyi.log.request";

    /**
     * 是否开启请求日志
     */
    private boolean enabled = true;

    /**
     * 日志打印级别
     */
    private RequestLogLevel level = RequestLogLevel.BODY;

    /**
     * 排除需要日志打印输出的接口
     */
    private List<String> exclude = Collections.emptyList();
}
